<?php

namespace IMT\Plugins\ParticipantsBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * IMT\EventBundle\Entity\ParticipantEvent
 *
 * @ORM\Table(name="participant_event")
 * @ORM\Entity()
 */
class ParticipantEvent
{
	const PARTICIPATION_STATE_INVITED = 0;
	const PARTICIPATION_STATE_DONTKNOW = 1;
	const PARTICIPATION_STATE_PARTICIPATING = 2;
	const PARTICIPATION_STATE_CANCELED = 3;
	
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var smallint $participationState
     *
     * @ORM\Column(name="participationState", type="smallint")
     */
    private $participationState;
    
     /**
     * @ORM\ManyToOne(targetEntity="IMT\EventBundle\Entity\Event", inversedBy="participants")
     * @ORM\joinColumn(name="event_id", referencedColumnName="id")
     */
    private $event;
    
    /**
     * @ORM\ManyToOne(targetEntity="IMT\UserBundle\Entity\Contact", inversedBy="events")
     * @ORM\joinColumn(name="contact_id", referencedColumnName="id")
     */
    private $participant;
    
    /**
     * @ORM\ManyToOne(targetEntity="IMT\AccountBundle\Entity\Account", inversedBy="participantEvent")
     * @ORM\joinColumn(name="account_id", referencedColumnName="id")
     */
    private $account;
    
    /**
     * Constructor
     */
	public function __construct()
	{
		$this->event = NULL;
		$this->participant = NULL;
		$this->account = NULL;
	}
	
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set participationState
     *
     * @param smallint $participationState
     */
    public function setParticipationState($participationState)
    {
        $this->participationState = $participationState;
    }

    /**
     * Get participationState
     *
     * @return smallint 
     */
    public function getParticipationState()
    {
        return $this->participationState;
    }

    /**
     * Set event
     *
     * @param IMT\EventBundle\Entity\Event $event
     */
    public function setEvent(\IMT\EventBundle\Entity\Event $event)
    {
        $this->event = $event;
    }

    /**
     * Get event
     *
     * @return IMT\EventBundle\Entity\Event 
     */
    public function getEvent()
    {
        return $this->event;
    }

    /**
     * Set participant
     *
     * @param IMT\UserBundle\Entity\Contact $participant
     */
    public function setParticipant(\IMT\UserBundle\Entity\Contact $participant)
    {
        $this->participant = $participant;
    }

    /**
     * Get participant
     *
     * @return IMT\UserBundle\Entity\Contact 
     */
    public function getParticipant()
    {
        return $this->participant;
    }

    /**
     * Set account
     *
     * @param IMT\AccountBundle\Entity\Account $account
     */
    public function setAccount(\IMT\AccountBundle\Entity\Account $account)
    {
        $this->account = $account;
    }

    /**
     * Get account
     *
     * @return IMT\AccountBundle\Entity\Account 
     */
    public function getAccount()
    {
        return $this->account;
    }
}